<?
	foreach ($slider as $key => $item) {
		if ($key == 0) {
			$selectors = '<div class="slider_active" slide="'.$key.'"></div>';
			$titles = '<h2 slide="'.$key.'">'.$item->title.'</h2>';
			$texts = '<p slide="'.$key.'">'.$item->text.'</p>';
			$links = '<a class="underline" href="'.$item->link.'" slide="'.$key.'">Подробнее</a>';
			$images = '<div class="banner_image" style="background-image: url('.URL::site('static/uploads/slider/normal/'.$item->image).')" slide="'.$key.'"></div>';
		} else {
			$selectors .= '<div class="slider" slide="'.$key.'"></div>';
			$titles .= '<h2 style="display: none" slide="'.$key.'">'.$item->title.'</h2>';
			$texts .= '<p style="display: none" slide="'.$key.'">'.$item->text.'</p>';
			$links .= '<a class="underline" href="'.$item->link.'" style="display: none" slide="'.$key.'">Подробнее</a>';
			$images .= '<div class="banner_image" style="display: none; background-image: url('.URL::site('static/uploads/slider/normal/'.$item->image).')" slide="'.$key.'"></div>';
		}
	}
?>

<div class="banner_cont">
	<div class="banner_text_cont">
		<?= $titles ?>
		<?= $texts ?>
		<?= $links ?>
	</div>
	<div class="slider_cont">
		<?= $selectors ?>
	</div>
	<?= $images ?>
</div>